@@ -53,7 +53,7 @@ |
||
| 53 | 53 |
</td> |
| 54 | 54 |
<td class='<%= "agent-unavailable" if agent.unavailable? %>'> |
| 55 | 55 |
<% if agent.can_create_events? %> |
| 56 |
- <%= link_to(agent.events_count || 0, agent_events_path(agent)) %> |
|
| 56 |
+ <%= link_to(agent.events_count || 0, agent_events_path(agent, return: (defined?(return_to) && return_to) || request.path)) %> |
|
| 57 | 57 |
<% else %> |
| 58 | 58 |
<span class='not-applicable'></span> |
| 59 | 59 |
<% end %> |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 |
<li><a href="#logs" data-toggle="tab" data-agent-id="<%= @agent.id %>" class='<%= @agent.recent_error_logs? ? 'recent-errors' : '' %>'><span class='glyphicon glyphicon-list-alt'></span> Logs</a></li> |
| 16 | 16 |
|
| 17 | 17 |
<% if @agent.can_create_events? && @agent.events.count > 0 %> |
| 18 |
- <li><%= link_to icon_tag('glyphicon-random') + ' Events'.html_safe, agent_events_path(@agent) %></li>
|
|
| 18 |
+ <li><%= link_to icon_tag('glyphicon-random') + ' Events'.html_safe, agent_events_path(@agent, return: request.fullpath) %></li>
|
|
| 19 | 19 |
<% else %> |
| 20 | 20 |
<li class='disabled'><a><span class='glyphicon glyphicon-random'></span> Events</a></li> |
| 21 | 21 |
<% end %> |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 |
|
| 41 | 41 |
<% if @agent %> |
| 42 | 42 |
<div class="btn-group"> |
| 43 |
- <%= link_to icon_tag('glyphicon-eye-open') + ' View Agent'.html_safe, agent_path(@agent, return: request.fullpath), class: "btn btn-default" %>
|
|
| 43 |
+ <%= link_to icon_tag('glyphicon-chevron-left') + ' Back'.html_safe, filtered_agent_return_link || agents_path, class: "btn btn-default" %>
|
|
| 44 | 44 |
<%= link_to icon_tag('glyphicon-random') + ' See all events'.html_safe, events_path, class: "btn btn-default" %>
|
| 45 | 45 |
</div> |
| 46 | 46 |
<% end %> |